<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
  	<meta charset="utf-8">
  	<title>测试通用control</title>
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
</head>
<body>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectList", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getList\"}")'>查询所有</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getList"
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectList", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getList\",\"pageNum\":2,\"pageSize\":10}")'>分页查询</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getList",
		"pageNum": 2,
		"pageSize": 10
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectOne", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getOne\",\"param\":{\"id\":\"T000000020\"}}")'>查询一条</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getOne",
		"param": {"id": "T000000020"}
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectOne", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getMap\",\"param\":{\"id\":\"T000000020\"}}")'>查询一条返回map</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getOne",
		"param": {"id": "T000000020"}
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectList", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getMoreTableList\",\"param\":{\"ids\":[{\"id\":\"T000000011\"},{\"id\":\"T000000012\"},{\"id\":\"T000000013\"},{\"id\":\"T000000014\"},{\"id\":\"T000000015\"}]}}")'>多表查询</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getMoreTableList",
		"param": {
			"ids": [
				{"id": "T000000011"},
				{"id": "T000000012"},
				{"id": "T000000013"},
				{"id": "T000000014"},
				{"id": "T000000015"}
			]
		}
	}
	 -->
	<br/>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectListUseRedis", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getList\"}")'>查询所有(使用缓存)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getList"
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectListUseRedis", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getList\",\"pageNum\":2,\"pageSize\":10}")'>分页查询(使用缓存)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getList",
		"pageNum": 2,
		"pageSize": 10
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectOneUseRedis", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getOne\",\"param\":{\"id\":\"T000000020\"}}")'>查询一条(使用缓存)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getOne",
		"param": {"id": "T000000020"}
	}
	 -->
	<br/>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/selectList", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.getForeachList\",\"param\":{\"ids\":[{\"id\":\"T000000011\"},{\"id\":\"T000000012\"},{\"id\":\"T000000013\"},{\"id\":\"T000000014\"},{\"id\":\"T000000015\"}]}}")'>使用in条件查询(mybatis使用foreach循环)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.getForeachList",
		"param": {
			"ids": [
				{"id": "T000000011"},
				{"id": "T000000012"},
				{"id": "T000000013"},
				{"id": "T000000014"},
				{"id": "T000000015"}
			]
		}
	}
	 -->
	<br/>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/insert", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.insertOne\",\"param\":{\"id\":\"T000000056\",\"name_test\":\"测试0056\",\"inserttime\":\"2018-01-25 11:09:35\",\"updatetime\":\"2018-01-25 11:09:35\",\"remark\":\"测试0056备注\",\"size\":\"56\"}}")'>插入一条数据</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.insertOne",
		"param": {
			"id": "T000000056",
			"name_test": "测试0056",
			"inserttime": "2018-01-25 11:09:35",
			"updatetime": "2018-01-25 11:09:35",
			"remark": "测试0056备注",
			"size": "56"
		}
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/insert", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.insertMore\",\"param\":{\"universal\":[" +
		"{\"id\":\"T000000057\",\"name_test\":\"测试0057\",\"inserttime\":\"2018-01-25 11:10:35\",\"updatetime\":\"2018-01-25 11:10:35\",\"remark\":\"测试0057备注\",\"size\":\"57\"}," +
		"{\"id\":\"T000000058\",\"name_test\":\"测试0058\",\"inserttime\":\"2018-01-25 11:11:35\",\"updatetime\":\"2018-01-25 11:11:35\",\"remark\":\"测试0058备注\",\"size\":\"58\"}," +
		"{\"id\":\"T000000059\",\"name_test\":\"测试0059\",\"inserttime\":\"2018-01-25 11:12:35\",\"updatetime\":\"2018-01-25 11:12:35\",\"remark\":\"测试0059备注\",\"size\":\"59\"}," +
		"{\"id\":\"T000000060\",\"name_test\":\"测试0060\",\"inserttime\":\"2018-01-25 11:13:35\",\"updatetime\":\"2018-01-25 11:13:35\",\"remark\":\"测试0060备注\",\"size\":\"60\"}," +
		"{\"id\":\"T000000061\",\"name_test\":\"测试0061\",\"inserttime\":\"2018-01-25 11:14:35\",\"updatetime\":\"2018-01-25 11:14:35\",\"remark\":\"测试0061备注\",\"size\":\"61\"}," +
		"{\"id\":\"T000000062\",\"name_test\":\"测试0062\",\"inserttime\":\"2018-01-25 11:15:35\",\"updatetime\":\"2018-01-25 11:15:35\",\"remark\":\"测试0062备注\",\"size\":\"62\"}," +
		"{\"id\":\"T000000063\",\"name_test\":\"测试0063\",\"inserttime\":\"2018-01-25 11:16:35\",\"updatetime\":\"2018-01-25 11:16:35\",\"remark\":\"测试0063备注\",\"size\":\"63\"}," +
		"{\"id\":\"T000000064\",\"name_test\":\"测试0064\",\"inserttime\":\"2018-01-25 11:17:35\",\"updatetime\":\"2018-01-25 11:17:35\",\"remark\":\"测试0064备注\",\"size\":\"64\"}," +
		"{\"id\":\"T000000065\",\"name_test\":\"测试0065\",\"inserttime\":\"2018-01-25 11:18:35\",\"updatetime\":\"2018-01-25 11:18:35\",\"remark\":\"测试0065备注\",\"size\":\"65\"}," +
		"{\"id\":\"T000000066\",\"name_test\":\"测试0066\",\"inserttime\":\"2018-01-25 11:19:35\",\"updatetime\":\"2018-01-25 11:19:35\",\"remark\":\"测试0066备注\",\"size\":\"66\"}," +
		"{\"id\":\"T000000067\",\"name_test\":\"测试0067\",\"inserttime\":\"2018-01-25 11:20:35\",\"updatetime\":\"2018-01-25 11:20:35\",\"remark\":\"测试0067备注\",\"size\":\"67\"}," +
		"{\"id\":\"T000000068\",\"name_test\":\"测试0068\",\"inserttime\":\"2018-01-25 11:21:35\",\"updatetime\":\"2018-01-25 11:21:35\",\"remark\":\"测试0068备注\",\"size\":\"68\"}," +
		"{\"id\":\"T000000069\",\"name_test\":\"测试0069\",\"inserttime\":\"2018-01-25 11:22:35\",\"updatetime\":\"2018-01-25 11:22:35\",\"remark\":\"测试0069备注\",\"size\":\"69\"}," +
		"{\"id\":\"T000000070\",\"name_test\":\"测试0070\",\"inserttime\":\"2018-01-25 11:23:35\",\"updatetime\":\"2018-01-25 11:23:35\",\"remark\":\"测试0070备注\",\"size\":\"70\"}" +
		"]}}")'>插入多条数据</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.insertMore",
		"param": {
			"universal": [
				{"id": "T000000057", "name_test": "测试0057", "inserttime": "2018-01-25 11:10:35", "updatetime": "2018-01-25 11:10:35", "remark": "测试0057备注", "size": "57"}, 
				{"id": "T000000058", "name_test": "测试0058", "inserttime": "2018-01-25 11:11:35", "updatetime": "2018-01-25 11:11:35", "remark": "测试0058备注", "size": "58"}, 
				{"id": "T000000059", "name_test": "测试0059", "inserttime": "2018-01-25 11:12:35", "updatetime": "2018-01-25 11:12:35", "remark": "测试0059备注", "size": "59"}, 
				{"id": "T000000060", "name_test": "测试0060", "inserttime": "2018-01-25 11:13:35", "updatetime": "2018-01-25 11:13:35", "remark": "测试0060备注", "size": "60"}, 
				{"id": "T000000061", "name_test": "测试0061", "inserttime": "2018-01-25 11:14:35", "updatetime": "2018-01-25 11:14:35", "remark": "测试0061备注", "size": "61"}, 
				{"id": "T000000062", "name_test": "测试0062", "inserttime": "2018-01-25 11:15:35", "updatetime": "2018-01-25 11:15:35", "remark": "测试0062备注", "size": "62"}, 
				{"id": "T000000063", "name_test": "测试0063", "inserttime": "2018-01-25 11:16:35", "updatetime": "2018-01-25 11:16:35", "remark": "测试0063备注", "size": "63"}, 
				{"id": "T000000064", "name_test": "测试0064", "inserttime": "2018-01-25 11:17:35", "updatetime": "2018-01-25 11:17:35", "remark": "测试0064备注", "size": "64"}, 
				{"id": "T000000065", "name_test": "测试0065", "inserttime": "2018-01-25 11:18:35", "updatetime": "2018-01-25 11:18:35", "remark": "测试0065备注", "size": "65"}, 
				{"id": "T000000066", "name_test": "测试0066", "inserttime": "2018-01-25 11:19:35", "updatetime": "2018-01-25 11:19:35", "remark": "测试0066备注", "size": "66"}, 
				{"id": "T000000067", "name_test": "测试0067", "inserttime": "2018-01-25 11:20:35", "updatetime": "2018-01-25 11:20:35", "remark": "测试0067备注", "size": "67"}, 
				{"id": "T000000068", "name_test": "测试0068", "inserttime": "2018-01-25 11:21:35", "updatetime": "2018-01-25 11:21:35", "remark": "测试0068备注", "size": "68"}, 
				{"id": "T000000069", "name_test": "测试0069", "inserttime": "2018-01-25 11:22:35", "updatetime": "2018-01-25 11:22:35", "remark": "测试0069备注", "size": "69"}, 
				{"id": "T000000070", "name_test": "测试0070", "inserttime": "2018-01-25 11:23:35", "updatetime": "2018-01-25 11:23:35", "remark": "测试0070备注", "size": "70"}
			]
		}
	}
	 -->
	<br/>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/update", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.update\",\"param\":{\"name_test\":\"，controller测试更新\",\"inserttime\":\"2018-01-25 11:18:35\",\"updatetime\":\"2018-01-25 11:18:35\",\"remark\":\"，controller测试更新\"," +
		"\"w_name_test\":\"测试0065\"" +
		"}}")'>修改数据一条数据</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.update",
		"param": {
			"name_test": "，controller测试更新",
			"inserttime": "2018-01-25 11:18:35",
			"updatetime": "2018-01-25 11:18:35",
			"remark": "，controller测试更新",
			"w_name_test": "测试0065"
		}
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/update", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.update\",\"param\":{\"name_test\":\"，controller测试更新\",\"remark\":\"，controller测试更新\"," +
		"\"w_ids\":[{\"id\":\"T000000066\"},{\"id\":\"T000000067\"},{\"id\":\"T000000068\"},{\"id\":\"T000000069\"},{\"id\":\"T000000070\"}],\"w_name_test\":\"测试\"" +
		"}}")'>修改多条数据(有in条件)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.update",
		"param": {
			"name_test": "，controller测试更新",
			"remark": "，controller测试更新",
			"w_ids": [
				{"id": "T000000066"},
				{"id": "T000000067"},
				{"id": "T000000068"},
				{"id": "T000000069"},
				{"id": "T000000070"}
			],
			"w_name_test": "测试"
		}
	}
	 -->
	<br/>
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/delete", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.delete\",\"param\":{\"name_test\":\"测试0064\"}}")'>删除数据一条数据</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.delete",
		"param": {"name_test": "测试0064"}
	}
	 -->
	<br/>
	<a href='javascript:void(0)' onclick='universalSelect("universal/delete", "{\"methodName\":\"com.songtech.universal.dao.UniversalControllerDao.delete\",\"param\":{\"ids\":[{\"id\":\"T000000063\"},{\"id\":\"T000000062\"},{\"id\":\"T000000061\"}],\"name_test\":\"测试\"}}")'>删除多条数据(有in条件)</a>
	<!-- 
	json = 
	{
		"methodName": "com.songtech.universal.dao.UniversalControllerDao.delete",
		"param": {
			"ids": [
				{"id": "T000000063"},
				{"id": "T000000062"},
				{"id": "T000000061"}
			],
			"name_test": "测试"
		}
	}
	 -->
	<br/>
	<script src="asserts/resource/js/jquery.min.js"></script>
	<script type="text/javascript">
		function universalSelect(url, parameter){
			$.ajax({
				type: "post",
				url: url,
				data: {
					parameter: JSON.stringify(parameter)
				},
				dataType: "json",
				success: function (data){
					console.log(data);
				},
				error: function (){
					alert("error");
				}
			});
		}
	</script>
</body>
</html>